package com.example.demo.dao;

import com.example.demo.entity.Customer;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface CustomerRepository extends MongoRepository<Customer, String> {

    public Customer findByFirstName(String firstName);
    public List<Customer> findByLastName(String lastName);
    long countByLastName(String lastName);
    Page<Customer> findAll(Pageable pageable);
    List<Customer> findDistinctCustomerByLastNameOrFirstName(String lastName, String firstName);
}
